﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DslModeling = global::Microsoft.VisualStudio.Modeling;
using DslDesign = global::Microsoft.VisualStudio.Modeling.Design;

namespace Mnow.MvvmLight.Tools.ViewModelDiagram
{
    public partial class Aggregate
    {
        #region Constructors, domain class Id

        /// <summary>
        /// Aggregate domain class Id.
        /// </summary>
        //public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0xfec4d347, 0xc3f0, 0x483b, 0xb7, 0x85, 0x4f, 0xb4, 0x57, 0xcc, 0x12, 0x37);

        // Constructors were not generated for this relationship because it had HasCustomConstructor
        // set to true. Please provide the constructors below in a partial class.
        //		
        /// <summary>
        /// Constructor
        /// Creates a Aggregate link in the same Partition as the given ViewModel
        /// </summary>
        /// <param name="source">ViewModel to use as the source of the relationship.</param>
        /// <param name="target">ViewModel to use as the target of the relationship.</param>
        public Aggregate(ViewModel source, ViewModel target)
            : base((source != null ? source.Partition : null), new DslModeling::RoleAssignment[] { new DslModeling::RoleAssignment(Aggregate.SourceViewModelDomainRoleId, source), new DslModeling::RoleAssignment(Aggregate.TargetViewModelDomainRoleId, target) }, null)
        {
            if (string.IsNullOrWhiteSpace(PropertyName))
            {
                PropertyName = target.Name;
            }
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="store">Store where new link is to be created.</param>
        /// <param name="roleAssignments">List of relationship role assignments.</param>
        public Aggregate(DslModeling::Store store, params DslModeling::RoleAssignment[] roleAssignments)
            : base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, null)
        {
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="store">Store where new link is to be created.</param>
        /// <param name="roleAssignments">List of relationship role assignments.</param>
        /// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
        public Aggregate(DslModeling::Store store, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
            : base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, propertyAssignments)
        {
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="partition">Partition where new link is to be created.</param>
        /// <param name="roleAssignments">List of relationship role assignments.</param>
        public Aggregate(DslModeling::Partition partition, params DslModeling::RoleAssignment[] roleAssignments)
            : base(partition, roleAssignments, null)
        {
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="partition">Partition where new link is to be created.</param>
        /// <param name="roleAssignments">List of relationship role assignments.</param>
        /// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
        public Aggregate(DslModeling::Partition partition, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
            : base(partition, roleAssignments, propertyAssignments)
        {
        }
        #endregion
    }
}
